package com.th.supcom.pds.drugreturn.client.widget;

import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.th.supcom.pds.common.client.commom.FieldPanel;

/**
 * @author yzhang
 */
public class DrugReturnPatientInfoPanel extends FieldSet
{
    /** 门诊退药文本域集合. */
    private final DrugReturnAndRefundFields m_drugReturnAndRefundFields;

    /**
     * 构造方法
     * 
     * @param drugReturnAndRefundFields
     */
    public DrugReturnPatientInfoPanel (final DrugReturnAndRefundFields drugReturnAndRefundFields)
    {
        m_drugReturnAndRefundFields = drugReturnAndRefundFields;
        initUI ();
    }

    /**
     * 初始化UI
     */
    private void initUI ()
    {
        setHeading ("患者基本信息");
        final FieldPanel pp = new FieldPanel ();
        pp.setLabelWidth (55);
        pp.setLabelAlian ("L");

        pp.addCol (m_drugReturnAndRefundFields.getPrescSource (), 1, null, null);
        pp.addCol (m_drugReturnAndRefundFields.getPatiNameField (), 1, null, null);
        pp.addCol (m_drugReturnAndRefundFields.getPatiIdField (), 1, null, null);
        pp.addCol (m_drugReturnAndRefundFields.getSexField (), 1, null, null);
        pp.addCol (m_drugReturnAndRefundFields.getBirthDaTetField (), 1, null, null);
        pp.addCol (m_drugReturnAndRefundFields.getRemainingSumField (), 1, null, null);
        pp.newRow ();

        final FieldPanel pp2 = new FieldPanel ();
        pp2.setLabelWidth (55);
        pp2.setLabelAlian ("L");

        pp2.addCol (m_drugReturnAndRefundFields.getVisitTypeNameField (), 1, null, null);
        pp2.addCol (m_drugReturnAndRefundFields.getVisitIdField (), 1, null, null);
        pp2.addCol (m_drugReturnAndRefundFields.getVisitBeginDateField (), 1, null, null);
        pp2.addCol (m_drugReturnAndRefundFields.getDeptNameField (), 1, null, null);
        pp2.addCol (m_drugReturnAndRefundFields.getDay (), 1, null, null);
        pp2.addCol (m_drugReturnAndRefundFields.getNumber (), 1, null, null);
        pp2.newRow ();
        add (pp);
        add (pp2);
    }
}
